package com.github.phoenics.militia.bazookaFx.model;

import org.springframework.beans.BeanUtils;

/**
 * @author Phoenics Chow
 * on 2019年01月30日
 */
public interface IModel {
    void clear();
    default  <T> T takeObjectWarpper(T object){
        if(object==null){
            return null;
        }
        BeanUtils.copyProperties(this,object);
        return object;
    }
    default void modelWarpper(Object object,String ...args){
        if(object!=null){
            BeanUtils.copyProperties(object,this,args);
        }
    }
}
